{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <div class="row">
                <!--搜索框开始-->
                <div class="col-sm-12">
                    <div class="layui-form layui-form-item">

                        <div class="layui-col-md6 layui-input-inline">
                            <input type="text" id="keyword" class="layui-input search" name="keyword"
                                   placeholder="标题"/>
                        </div>

                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit="" lay-filter="LAY-search">立即搜索</button>
                            <button class="layui-btn layui-btn-normal" id="empty" lay-submit="" lay-filter="LAY-search">
                                重置
                            </button>
                        </div>
                    </div>
                </div>
                <!--搜索框开始-->
                <!--操作框开始-->
                <!--<div class="col-sm-12">-->
                    <!--<div class="input-group">-->
                        <!--<button class="btn btn-primary" type="button" onclick="wk.href('{:url('add')}');">-->
                            <!--<i class="fa fa-plus"></i> 发布自媒体资讯-->
                        <!--</button>-->
                    <!--</div>-->
                <!--</div>-->
                <!--操作框结束-->
            </div>
            <div class="hr-line-dashed"></div>

            <div class="example-wrap">
                <div class="example">
                    <table class="layui-hide" id="test" lay-filter="testReload"></table>

                    <!--图片模板-->
                    <!--<script type="text/html" id="imgTpl">-->
                        <!--<img src="{{d.media_url_thumb}}" class="img-circle table-img" onerror="this.src='/static/admin/images/head_default.gif'"/>-->
                    <!--</script>-->
                    <!--状态显示模板-->
                    <!--<script type="text/html" id="statBar">-->
                    <!--{{# if(d.assn_type == 1){ }}-->
                    <!--军事类社团-->
                    <!--{{# } }}-->
                    <!--{{# if(d.assn_type == 2){ }}-->
                    <!--非军事类社团-->
                    <!--{{# } }}-->
                    <!--</script>-->

                    <!--<script type="text/html" id="statBar1">-->
                    <!--{{# if(d.assn_is_first == 1){ }}-->
                    <!--双一流-->
                    <!--{{# } }}-->
                    <!--{{# if(d.assn_is_first == 2){ }}-->
                    <!--非双一流-->
                    <!--{{# } }}-->
                    <!--</script>-->

                    <!--操作模板-->
                    <script type="text/html" id="opeBar">
                        <a href="javascript:;" onclick="wk.href('{:url('detail')}?id={{d.answer_id}}')" class="btn btn-primary btn-xs m-r-xs" title="详情">评论回复列表</a>
                        <a href="javascript:;" onclick="wk.confirm('{{d.answer_id}}','{:url('del')}','确认删除?')" class="btn  btn-danger btn-xs m-r-xs" title="删除">删除</a>
                        <!--{{# if(d.is_show == 1){ }}-->
                        <!--<a href="javascript:;" onclick="wk.confirm('{{d.information_id}}','{:url('upAndDown')}','确认下架?')" class="btn btn-danger btn-xs m-r-xs" title="下架">下架</a>-->
                        <!--{{# } }}-->
                        <!--{{# if(d.is_show == 2){ }}-->
                        <!--<a href="javascript:;" onclick="wk.confirm('{{d.information_id}}','{:url('upAndDown')}','确认上架?')" class="btn btn-primary btn-xs m-r-xs" title="上架">上架</a>-->
                        <!--{{# } }}-->

                        <!--{{# if(d.information_selected == 1){ }}-->
                        <!--<a href="javascript:;" onclick="wk.confirm('{{d.information_id}}','{:url('Selected')}','取消精选?')" class="btn btn-primary btn-xs m-r-xs" title="精选">精选</a>-->
                        <!--{{# } }}-->
                        <!--{{# if(d.information_selected == 2){ }}-->
                        <!--<a href="javascript:;" onclick="wk.confirm('{{d.information_id}}','{:url('Selected')}','确认精选?')" class="btn  btn-danger btn-xs m-r-xs" title="取消精选">取消精选</a>-->
                        <!--{{# } }}-->
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    //layui渲染数据表格
    layui.use('table', function () {
        var table = layui.table
                , form = layui.form;
        table.render({
            elem: '#test'
            , url: '{:url("answer/index")}'
            , response: {
                statusCode: 220 //成功的状态码，默认：0
            }
            , page: true
            , size: 'lg' //sm小尺寸的表格 lg大尺寸
            , cellMinWidth: 150
            , limits: [5, 10, 15, 20, 25, 30]
            , limit: "{:config('pages')}"
            , loading: true
            , id: 'testReload'
            , cols: [[
//                {type: 'checkbox', fixed: 'left',}
                {type: 'numbers', width: 80, title: '序号'}
                , {field: 'answer_id', width: '', title: '问题ID', align: 'center'}
                , {field: 'answer_title', width: 180, title: '问题标题', align: 'center'}
                , {field: 'user_username', width: 100, title: '发布用户', align: 'center'}
                , {field: 'answer_time', width: 200, title: '发布时间', align: 'center'}
                , {fixed: 'right', width: 200, title: '操作', align: 'center', toolbar: '#opeBar'}
            ]]
            , done: function (res, curr, count) {
                $('.img-circle').viewer({
                    url: 'data-original',
                });
            }
        });
    });
</script>
</body>
</html>